<template>
    <div class="detail">
      <div class="box">
      <div class="text">
          <div style="margin-left:10px">详情</div>
          <div class="edit">
              <div  @click="router.go(-1)">编辑</div>
              <div  @click="router.go(-1)">返回</div>
          </div>
          
      </div>
      <div style="border:none">
          <span>报销人:&nbsp;&nbsp;{{b.name}}</span><br>
      <span>报销类型:&nbsp;&nbsp;{{b.type}}</span><br>
      <span>报销时间:&nbsp;&nbsp;{{b.date}}</span><br>
      <span>报销金额:&nbsp;&nbsp;{{b.money}}</span><br>
      <span>报销状态:&nbsp;&nbsp;{{b.stus}}</span><br>
      <span style="display:inline-block">备注说明:&nbsp;&nbsp;无&nbsp;&nbsp;&nbsp;&nbsp;<span @click="add" style="color:#63b9be;display:inline-block;cursor: pointer;">添加</span></span>
      </div>
    
      </div>
   </div>
  </template>
  <script setup>
  import { onMounted } from "@vue/runtime-core";
  import axios from "axios";
  import { ref } from "vue";
  import { useRouter, useRoute } from 'vue-router'
  var b = ref([])
  var router = useRouter()
  var route = useRoute()
  b.value =route.query
  console.log(b.value);
  onMounted(() => {
      //详情
      axios.post("/api/user_money/detail",  {id: b.value.id} ).then((res) => {
          // console.log(res.data);
          b.value=res.data
      })
  
  })
  
  var add = () => {
     router.push("/index/personadd")
  }
  
  
  </script>
  <style scoped lang="scss">
  
  
  .detail{
      border: 1px solid #e4e4e4;
  }
  .box{
      width: 200px;
      height: 500px;
      margin-left: 50px;
    
      span{
          display: block;
          margin-bottom: 5px;
          font-size: 12px;
          margin-top: 20px;
      }
  }
  .text{
      display: flex;
      width: 1328px;
      justify-content: space-between;
      background: #f2f2f2;
      height: 50px;
      align-items: center;
      color: #000;
      margin-left: -50px;
     
  
  }
  .edit{
      display: flex;
      justify-content: space-between;
      width: 150px;
      margin-left: 50px;
      font-size: 14px;
      div{
          width: 100px;
          height: 40px;
          line-height: 40px;
          text-align: center;
          color: #63c8e0;
          font-size: 12px;
          background: white;
          margin-right: 20px;
          cursor: pointer;
      }    
  }
  
  </style>